Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not add prolog for variadic naked functions #123249

Merged
merged 1 commit into from
Apr 12, 2024
Merged

do not add prolog for variadic naked functions #123249

merged 1 commit into from
Apr 12, 2024

Conversation

goolmoos
Copy link
Contributor

fixes #99858

@rustbot
Copy link
Collaborator

rustbot commented Mar 30, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Nadrieril (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 30, 2024
@Nadrieril
Copy link
Member

I am not knowledgeable in this part of the compiler, reassigning

r? compiler

@rustbot rustbot assigned pnkfelix and unassigned Nadrieril Mar 31, 2024
@bors
Copy link
Contributor

bors commented Apr 12, 2024

☔ The latest upstream changes (presumably #123838) made this pull request unmergeable. Please resolve the merge conflicts.

@pnkfelix
Copy link
Member

This change looks like a strict improvement, so I'm going to approve the PR.


However, reading it raised a question for me.

According to my understanding of this PR, its effectively ensuring that args will be empty here:

let local_values = {
let args = arg_local_refs(&mut start_bx, &mut fx, &memory_locals);

which then implies that this loop will not have any args to iterate over:

let retptr = allocate_local(mir::RETURN_PLACE);
iter::once(retptr)
.chain(args.into_iter())
.chain(mir.vars_and_temps_iter().map(allocate_local))
.collect()
};
fx.initialize_locals(local_values);

What about the other components in that chained iterator, namely the retptr and the vars_and_temps_iter ? In particular, does processing the retptr ever imply that a function epilogue will be emitted (which should not be the case for #[naked]) ?

@pnkfelix
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 12, 2024

📌 Commit 9139d72 has been approved by pnkfelix

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 12, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#123204 (rustdoc: point at span in `include_str!`-ed md file)
 - rust-lang#123223 (Fix invalid silencing of parsing error)
 - rust-lang#123249 (do not add prolog for variadic naked functions)
 - rust-lang#123825 (Call the panic hook for non-unwind panics in proc-macros)
 - rust-lang#123833 (Update stdarch submodule)
 - rust-lang#123841 (Improve diagnostic by suggesting to remove visibility qualifier)
 - rust-lang#123849 (Update E0384.md)
 - rust-lang#123852 (fix typo in library/std/src/lib.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4a0e9e0 into rust-lang:master Apr 12, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 12, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 12, 2024
Rollup merge of rust-lang#123249 - goolmoos:naked_variadics, r=pnkfelix

do not add prolog for variadic naked functions

fixes rust-lang#99858
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

naked + variadic args partially ignores the naked
5 participants